<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // const { name, age } = { name: '佩奇', age: 6 }
        // console.log(name);
        // console.log(age);\

        // const { name: uname, age } = { name: '佩奇', age: 6 }
        // console.log(uname);

        const [{ goodsName, price }] = [{
            goodsName: '小米',
            price: 1999
        }]
        console.log(goodsName);
    </script>
</body>

</html>